/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package towerz.component;

import java.util.Vector;
import javax.microedition.lcdui.Graphics;

/**
 *
 * @author TimotiusNC
 */
public class ButtonList {
	public ButtonList(){
		
	}

	public ButtonList(Vector button, int shown, int x, int y) {
		m_index		= 0;		//Show from first
		m_shown		= shown;
		m_Buttons	= button;
	}

	public void draw(Graphics g) {
		//Draw all buttons
		for (int i = m_index; i < ((m_index + m_shown) < m_Buttons.size() ? (m_index + m_shown) : m_Buttons.size()); ++i) {
			((Button)m_Buttons.elementAt(i)).draw(g);
		}
	}

	Vector	m_Buttons;
	int		m_shown;
	int		m_index;
	int		m_X;
	int		m_Y;
}
